package com.yt.hadoop.output;

/**
 * @Classname FilterMapper
 * @Description
 * @Date 2021/12/8 10:03
 * @Create by 杨涛
 */
import java.io.IOException;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class FilterMapper extends Mapper<LongWritable, Text, Text, NullWritable>{

    /**
     *
     * @param key  行开始坐标
     * @param value 本行内容
     * @param context  上下文
     * @throws IOException
     * @throws InterruptedException
     */
    @Override
    protected void map(LongWritable key, Text value, Context context)	throws IOException, InterruptedException {

        // 写出
        context.write(value, NullWritable.get());
    }
}
